import http from "@/utils/request"
const URL = '/processing/business-processing';

export function getAllInfoByPage(pageNum = 1, pageSize = 10,processingId) {
  return http({
      url:`${URL}/page/${pageNum}/${pageSize}?processingId=${processingId}`,
      method: 'get',
  })
}


// 展示修改前的内容
export function showEidtRequest(id){
  return http({
      url:`${URL}/${id}`,
      method: 'get',
  })
}

// 修改数据
export function EidtRequest(id,data){
  return http({
      url:`${URL}/update/${id}`,
      method: 'put',
      data: data
  })
}

//通过id删除订单
export function deleteOrder(id) {
  return http({
  url: `${URL}/deletion/${id}`,
  method:'delete'
})
}

//新增商家
export function AddOrder(data) {
  return http({
      url:`${URL}/`,
      method: 'post',
      data
  })
}

// 通过商家类型查询数据
export function getInfoByBatch(data) {
  return http({
      url: `${URL}/get/${data.type}/${data.pageNum}/${data.pageSize}?processingId=${data.id}`,
      method:'get'
  })
}

